import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/admin/trainingStudent/studentPage',
    method: 'get',
    params: query
  })
}

export function intentionEntryPage(query) {
  return request({
    url: '/admin/trainingStudent/intentionEntryPage',
    method: 'post',
    data: query
  })
}

export function searchPage(query) {
  return request({
    url: '/admin/trainingStudent/searchPage',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/admin/trainingStudent/',
    method: 'post',
    data: obj
  })
}

export function addFlowup(obj) {
  return request({
    url: '/admin/trainingStudent/addFlowup',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/admin/trainingStudent/' + id,
    method: 'get'
  })
}

export function delObj(row) {
  return request({
    url: '/admin/trainingStudent/' + row.fid,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/admin/trainingStudent/',
    method: 'put',
    data: obj
  })
}

export function checkWeight(obj) {
  return request({
    url: '/admin/trainingStudent/checkWeight',
    method: 'post',
    data: obj
  })
}

export function batchGrouping(obj, group) {
  return request({
    url: '/admin/trainingStudent/batchGrouping/' + group,
    method: 'put',
    data: obj
  })
}

export function checkInformation(obj) {
  return request({
    url: '/admin/trainingStudent/checkInformation?str=' + obj,
    method: 'post'
  })
}

